package com.example.demo.confi;

import com.alibaba.fastjson.JSONObject;
import com.example.demo.others.git.AutoPushUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Created by Administrator on 2017/3/17 0017.
 */

public class JenkinsDailyConf {


    public static List<JSONObject> packages = new ArrayList<>();

    static {

        JSONObject j = AutoPushUtil.create("trade", "trade-web.war", "", null); //trade-web 无依赖
        //provider 依赖 api
        JSONObject provider = AutoPushUtil.create("provider", "service-provider.jar", "\\lib\\service-provider-2.0.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0.jar"));
        JSONObject bypay = AutoPushUtil.create("bypay", "service-bypay.jar", "\\lib\\service-bypay-2.0.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0.jar"));
        JSONObject info = AutoPushUtil.create("info", "service-info-0.0.1-SNAPSHOT.jar", "\\lib\\service-info-0.0.1-SNAPSHOT.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0-SNAPSHOT.jar"));
        JSONObject task = AutoPushUtil.create("task", "service-task-0.0.1-SNAPSHOT.jar", "\\lib\\service-task-0.0.1-SNAPSHOT.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0-SNAPSHOT.jar"));
        JSONObject fastL = AutoPushUtil.create("fastLotteryCrawl", "fastLotteryCrawl.jar", "\\lib\\fastLotteryCrawl.jar", null);
        JSONObject auth = AutoPushUtil.create("auth", "auth-web.war", "auth-web.war", null);
        JSONObject push = AutoPushUtil.create("push", "service-push.jar", "\\lib\\service-push.jar", null);
        JSONObject api_manager = AutoPushUtil.create("api", "api-manage-0.0.1-SNAPSHOT.jar", "\\lib\\api-manage-0.0.1-SNAPSHOT.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0-SNAPSHOT.jar"));
        JSONObject ticket = AutoPushUtil.create("ticket", "service-ticket.jar", "\\lib\\service-ticket-2.0.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0.jar"));
        JSONObject ticket_query = AutoPushUtil.create("query", "service-ticket-query.jar", "\\lib\\service-ticket-query-2.0.jar", AutoPushUtil.createDepens("\\lib\\", "service-api.jar", "service-api-2.0.jar"));
        JSONObject job = AutoPushUtil.create("job", "service-job.war", "", null);

        packages.add(fastL);
        packages.add(j);
        packages.add(provider);
        packages.add(info);
        packages.add(task);
        packages.add(auth);
        packages.add(push);
        packages.add(api_manager);
        packages.add(job);
        packages.add(ticket);
        packages.add(bypay);
        packages.add(ticket_query);


    }


}
